import request from '@/router/axios';
// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-sale/modelcost/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 详情
export const detail = (id) => {
  return request({
    url: '/api/blade-sale/modelcost/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 保存
export const save = (data, ids) => {
  return request({
    url: '/api/blade-sale/modelcost/save',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

export const update = (data, ids) => {
  return request({
    url: '/api/blade-sale/modelcost/update',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

//批量删除
export const remove = (ids) => {
    return request({
      url: '/api/blade-sale/modelcost/remove',
      method: 'post',
      params: {
        ids
      }
    })
  }

// 根据物料组获取生产设备下拉选
export const getMouldNameList = (materialType) => {
  return request({
    url: '/api/hg-public/equipmentinfo/findAll',
    method: 'get',
    params: {
      materialType
    }
  })
}
  
//获取模具成本基本信息
export const getMoldCostList = (processMachine) => {
  return request({
    url: '/api/blade-sale/modelcost/list',
    method: 'get',
    params: {
      processMachine
    }
  })
}
